/*
 * @Author: 吴让坤
 * @Date: 2023-04-05 13:49:22
 * @LastEditTime: 2023-06-19 11:13:42
 * @Description: 描述
 */
import { send } from "src/utils/tools";
import FileService from "../service/file";

class FileController {
  private service: FileService = new FileService();
  /**
   * 列表
   */
  list = async (ctx) => {
    const data = await this.service.list(ctx.mydata);
    ctx.body = data
  };
  /**
   * 上传
   */
  upload = async (ctx) => {
    const data = await this.service.upload(ctx.mydata);
    ctx.body = data
  };
  /**
   * 下载
   */
  download = async (ctx) => {
    const data = await this.service.download(ctx);
    ctx.body =  data 
  };
  /**
   * 删除
   */
  delete = async (ctx) => {
    const data = await this.service.delete(ctx.mydata);
    ctx.body =  data 
  };
}

export default new FileController();
